import {request} from 'umi';
import {insert_QuestionsType,del_QuestionsType,questions,questionsCondition,questionsUpdate} from '@/utils/interface';
//获取所有的试题类型
export function getGetQuestionsType(){
    return request('/exam/getQuestionsType',{
        method:'GET',
    })
}
//添加试题类型
export function getInsertQuestionsType(data:insert_QuestionsType){
    return request('/exam/insertQuestionsType',{
        method:'GET',
        params:{...data}
    })
}
//删除指定的试题类型
export function postDelQuestionsType(data:del_QuestionsType){
    return request('/exam/delQuestionsType',{
        method:'POST',
        data
    })
}
//获取所有的课程
export function getSubject(){
    return request('/exam/subject',{
        method:'GET',
    })
}
//获取所有的考试类型
export function getExamType(){
    return request('/exam/examType',{
        method:'GET',
    })
}
//添加试题接口
export function postQuestions(data:questions){
    return request('/exam/questions',{
        method:'POST',
        data
    })
}
//获取所有的试题
export function getQuestions_new(){
    return request('/exam/questions/new',{
        method:'GET',
    })
}
//按条件获取试题
export function getQuestions_condition(data:questionsCondition){
    return request('/exam/questions/condition',{
        method:'GET',
        params:{...data}
    })
}
//更新试题
export function getQuestions_update(data:questionsUpdate){
    return request('/exam/questions/update',{
        method:'GET',
        data
    })
}